﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:scc="http://schemas.startreksupremacy.com/xaml/presentation"
                    xmlns:sys="clr-namespace:System;assembly=mscorlib">

  <DrawingBrush x:Key="UnpinnedGlyph"
                Stretch="None"
                AlignmentX="Center"
                AlignmentY="Center">
    <DrawingBrush.Drawing>
      <DrawingGroup>
        <DrawingGroup.Children>
          <GeometryDrawing Brush="White"
                           Geometry="F1 M 7,10.5L 9,10.5L 9,14.1L 8,15L 7,14.1L 7,10.5 Z ">
            <!--
              <GeometryDrawing.Brush>
                <LinearGradientBrush StartPoint="0.0,0.5"
                                     EndPoint="1.0,0.5">
                  <LinearGradientBrush.GradientStops>
                    <GradientStop Color="#FFC0C0C0"
                                  Offset="0.0" />
                    <GradientStop Color="#FFFFFFFF"
                                  Offset="0.5" />
                    <GradientStop Color="#FFC0C0C0"
                                  Offset="1.0" />
                  </LinearGradientBrush.GradientStops>
                </LinearGradientBrush>
              </GeometryDrawing.Brush>
-->
          </GeometryDrawing>
          <GeometryDrawing Brush="White"
                           Geometry="F1 M 5,2L 5,4L 6,4L 6,7L 5.5,7.5L 5,8L 4,8L 4,10L 12,10L 12,8L 11,8L 10.5,7.5 10,7L 10,4L 11,4L 11,2L 5,2 Z ">
            <GeometryDrawing.Pen>
              <Pen LineJoin="Bevel">
                <Pen.Brush>
                  <LinearGradientBrush StartPoint="0.0,0.5"
                                       EndPoint="1.0,0.5">
                    <LinearGradientBrush.GradientStops>
                      <GradientStop Color="#FF9D9D9E"
                                    Offset="0" />
                      <GradientStop Color="#FF7E8480"
                                    Offset="1" />
                    </LinearGradientBrush.GradientStops>
                  </LinearGradientBrush>
                </Pen.Brush>
              </Pen>
            </GeometryDrawing.Pen>
            <!--
              <GeometryDrawing.Brush>
                <LinearGradientBrush StartPoint="0.0,0.5"
                                     EndPoint="1.0,0.5">
                  <LinearGradientBrush.GradientStops>
                    <GradientStop Color="#FFFFFFFF"
                                  Offset="0" />
                    <GradientStop Color="#FFC0C0C0"
                                  Offset="1" />
                  </LinearGradientBrush.GradientStops>
                </LinearGradientBrush>
              </GeometryDrawing.Brush>
-->
          </GeometryDrawing>
        </DrawingGroup.Children>
      </DrawingGroup>
    </DrawingBrush.Drawing>
  </DrawingBrush>

  <DrawingBrush x:Key="PinnedGlyph"
                Stretch="None"
                AlignmentX="Center"
                AlignmentY="Center">
    <DrawingBrush.Drawing>
      <DrawingGroup>
        <DrawingGroup.Children>
          <GeometryDrawing Brush="White"
                           Geometry="F1 M 8,3.5C 10.5,3.5 12.5,5.5 12.5,8C 12.5,10.5 10.5,12.5 8,12.5C 5.5,12.5 3.5,10.5 3.5,8C 3.5,5.5 5.5,3.5 8,3.5 Z ">
            <GeometryDrawing.Pen>
              <Pen LineJoin="Round">
                <Pen.Brush>
                  <LinearGradientBrush StartPoint="0.0,0.0"
                                       EndPoint="1.0,1.0">
                    <LinearGradientBrush.GradientStops>
                      <GradientStop Color="#FFA2A3A2"
                                    Offset="0" />
                      <GradientStop Color="#FF535453"
                                    Offset="1" />
                    </LinearGradientBrush.GradientStops>
                  </LinearGradientBrush>
                </Pen.Brush>
              </Pen>
            </GeometryDrawing.Pen>
            <!--
              <GeometryDrawing.Brush>
                <LinearGradientBrush StartPoint="0.0,0.0"
                                     EndPoint="1.0,1.0">
                  <LinearGradientBrush.GradientStops>
                    <GradientStop Color="#FFFFFFFF"
                                  Offset="0" />
                    <GradientStop Color="#FFC0C0C0"
                                  Offset="1" />
                  </LinearGradientBrush.GradientStops>
                </LinearGradientBrush>
              </GeometryDrawing.Brush>
-->
          </GeometryDrawing>
          <GeometryDrawing Brush="White"
                           Geometry="F1 M 8,6.5C 8.82843,6.5 9.5,7.17157 9.5,8C 9.5,8.82843 8.82843,9.5 8,9.5C 7.17157,9.5 6.5,8.82843 6.5,8C 6.5,7.17157 7.17157,6.5 8,6.5 Z ">
            <GeometryDrawing.Pen>
              <Pen LineJoin="Round">
                <Pen.Brush>
                  <LinearGradientBrush StartPoint="0.0,0.0"
                                       EndPoint="1.0,1.0">
                    <LinearGradientBrush.GradientStops>
                      <GradientStop Color="#FF747674"
                                    Offset="0" />
                      <GradientStop Color="#FF515251"
                                    Offset="1" />
                    </LinearGradientBrush.GradientStops>
                  </LinearGradientBrush>
                </Pen.Brush>
              </Pen>
            </GeometryDrawing.Pen>
            <!--
              <GeometryDrawing.Brush>
                <LinearGradientBrush StartPoint="0.0,0.0"
                                     EndPoint="1.0,1.0">
                  <LinearGradientBrush.GradientStops>
                    <GradientStop Color="#FFFFFFFF"
                                  Offset="0" />
                    <GradientStop Color="#FFC0C0C0"
                                  Offset="1" />
                  </LinearGradientBrush.GradientStops>
                </LinearGradientBrush>
              </GeometryDrawing.Brush>
-->
          </GeometryDrawing>
          <GeometryDrawing Brush="White"
                           Geometry="F1 M 9.6875,3.5C 11.2408,3.5 12.5,4.7592 12.5,6.3125C 12.5,7.8658 11.2408,9.125 9.6875,9.125C 8.1342,9.125 6.875,7.8658 6.875,6.3125C 6.875,4.7592 8.1342,3.5 9.6875,3.5 Z ">
            <GeometryDrawing.Pen>
              <Pen LineJoin="Round">
                <Pen.Brush>
                  <LinearGradientBrush StartPoint="0.0,0.0"
                                       EndPoint="1.0,1.0">
                    <LinearGradientBrush.GradientStops>
                      <GradientStop Color="#FFB9BBB9"
                                    Offset="0" />
                      <GradientStop Color="#FF484A48"
                                    Offset="1" />
                    </LinearGradientBrush.GradientStops>
                  </LinearGradientBrush>
                </Pen.Brush>
              </Pen>
            </GeometryDrawing.Pen>
            <!--
              <GeometryDrawing.Brush>
                <LinearGradientBrush StartPoint="0.0,0.0"
                                     EndPoint="1.0,1.0">
                  <LinearGradientBrush.GradientStops>
                    <GradientStop Color="#FFFFFFFF"
                                  Offset="0" />
                    <GradientStop Color="#FFC0C0C0"
                                  Offset="1" />
                  </LinearGradientBrush.GradientStops>
                </LinearGradientBrush>
              </GeometryDrawing.Brush>
-->
          </GeometryDrawing>
        </DrawingGroup.Children>
      </DrawingGroup>
    </DrawingBrush.Drawing>
  </DrawingBrush>
  
  <!--
      BEGIN INFOCARD STYLE
    -->
  <Style TargetType="{x:Type scc:InfoCard}">
    <Style.Resources>
      
      <FontFamily x:Key="{x:Static scc:ClientResources.HeaderFontFamilyKey}">pack:///siteoforigin:,,,/Resources/Fonts/#Calibri</FontFamily>
      <FontFamily x:Key="{x:Static scc:ClientResources.DefaultFontFamilyKey}">pack://siteoforigin:,,,/Resources/Fonts/#Calibri</FontFamily>
      
      <sys:Double x:Key="{x:Static scc:ClientResources.HeaderFontSizeKey}">12</sys:Double>
      <sys:Double x:Key="{x:Static scc:ClientResources.DefaultFontSizeKey}">12</sys:Double>

      <FontWeight x:Key="{x:Static scc:ClientResources.HeaderFontWeightKey}">Bold</FontWeight>
      <FontWeight x:Key="{x:Static scc:ClientResources.DefaultFontWeightKey}">Normal</FontWeight>
      
      <SolidColorBrush x:Key="{x:Static scc:ClientResources.HeaderTextForegroundBrushKey}"
                       Color="#c0c0c0" />
      <SolidColorBrush x:Key="{x:Static scc:ClientResources.DefaultTextForegroundBrushKey}"
                       Color="#ffffff" />
      
      <Style x:Key="BaseButtonStyle"
             TargetType="ButtonBase">
        <Setter Property="Foreground"
                Value="#e0e0e0" />
        <Setter Property="Background">
          <Setter.Value>
            <LinearGradientBrush StartPoint="0,0"
                                 EndPoint="0,1">
              <GradientStop Offset="0"
                            Color="#646464" />
              <GradientStop Offset="1"
                            Color="#353535" />
              <!--
            <GradientStop Offset="0"
                          Color="#343434" />
            <GradientStop Offset="0.5"
                          Color="#272727" />
            <GradientStop Offset="0.5"
                          Color="#020202" />
            <GradientStop Offset="1"
                          Color="#000000" />
-->
            </LinearGradientBrush>
          </Setter.Value>
        </Setter>
        <Setter Property="Template">
          <Setter.Value>
            <ControlTemplate TargetType="ButtonBase">
              <Border x:Name="OuterBorder"
                      BorderThickness="1"
                      Background="{TemplateBinding Background}">
                <Border.BorderBrush>
                  <LinearGradientBrush StartPoint="0,0"
                                       EndPoint="0,1">
                    <GradientStop Offset="0"
                                  Color="#0d0d0d" />
                    <GradientStop Offset="0.5"
                                  Color="#151515" />
                    <GradientStop Offset="1"
                                  Color="#121212" />
                  </LinearGradientBrush>
                </Border.BorderBrush>
                <Border x:Name="InnerBorder"
                        BorderThickness="1">
                  <Border.BorderBrush>
                    <LinearGradientBrush StartPoint="0,0"
                                         EndPoint="0,1">
                      <GradientStop Offset="0"
                                    Color="#7c7c7c" />
                      <GradientStop Offset="0.5"
                                    Color="#2a2a2a" />
                      <GradientStop Offset="1"
                                    Color="#121212" />
                    </LinearGradientBrush>
                  </Border.BorderBrush>
                  <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                    Margin="{TemplateBinding Padding}" />
                </Border>
              </Border>
              <ControlTemplate.Triggers>
                  <Trigger Property="IsPressed"
                         Value="True">
                  <Setter Property="Background">
                    <Setter.Value>
                      <LinearGradientBrush StartPoint="0,1"
                                           EndPoint="0,0">
                        <GradientStop Offset="0"
                                      Color="#646464" />
                        <GradientStop Offset="1"
                                      Color="#353535" />
                      </LinearGradientBrush>
                    </Setter.Value>
                  </Setter>
                  <Setter TargetName="OuterBorder"
                          Property="BorderBrush">
                    <Setter.Value>
                      <LinearGradientBrush StartPoint="0,1"
                                           EndPoint="0,0">
                        <GradientStop Offset="0"
                                      Color="#0d0d0d" />
                        <GradientStop Offset="0.5"
                                      Color="#151515" />
                        <GradientStop Offset="1"
                                      Color="#121212" />
                      </LinearGradientBrush>
                    </Setter.Value>
                  </Setter>
                  <Setter TargetName="InnerBorder"
                          Property="BorderBrush">
                    <Setter.Value>
                      <LinearGradientBrush StartPoint="0,1"
                                           EndPoint="0,0">
                        <GradientStop Offset="0"
                                      Color="#7c7c7c" />
                        <GradientStop Offset="0.5"
                                      Color="#2a2a2a" />
                        <GradientStop Offset="1"
                                      Color="#121212" />
                      </LinearGradientBrush>
                    </Setter.Value>
                  </Setter>

                </Trigger>
              </ControlTemplate.Triggers>
            </ControlTemplate>
          </Setter.Value>
        </Setter>
      </Style>
      <Style x:Key="TitleBarButtonStyle"
             TargetType="ButtonBase">
        <Setter Property="Foreground"
                Value="#e0e0e0" />
        <Setter Property="Background">
          <Setter.Value>
            <LinearGradientBrush StartPoint="0,0"
                                 EndPoint="0,1">
              <GradientStop Offset="0"
                            Color="#646464" />
              <GradientStop Offset="1"
                            Color="#353535" />
              <!--
            <GradientStop Offset="0"
                          Color="#343434" />
            <GradientStop Offset="0.5"
                          Color="#272727" />
            <GradientStop Offset="0.5"
                          Color="#020202" />
            <GradientStop Offset="1"
                          Color="#000000" />
-->
            </LinearGradientBrush>
          </Setter.Value>
        </Setter>
        <Setter Property="Template">
          <Setter.Value>
            <ControlTemplate TargetType="ButtonBase">
              <Border x:Name="OuterBorder"
                      BorderThickness="1"
                      Background="{TemplateBinding Background}">
                <Border.BorderBrush>
                  <LinearGradientBrush StartPoint="0,0"
                                       EndPoint="0,1">
                    <GradientStop Offset="0"
                                  Color="#0d0d0d" />
                    <GradientStop Offset="0.5"
                                  Color="#151515" />
                    <GradientStop Offset="1"
                                  Color="#121212" />
                  </LinearGradientBrush>
                </Border.BorderBrush>
                <Border x:Name="InnerBorder"
                        BorderThickness="1">
                  <Border.BorderBrush>
                    <LinearGradientBrush StartPoint="0,0"
                                         EndPoint="0,1">
                      <GradientStop Offset="0"
                                    Color="#7c7c7c" />
                      <GradientStop Offset="0.5"
                                    Color="#2a2a2a" />
                      <GradientStop Offset="1"
                                    Color="#121212" />
                    </LinearGradientBrush>
                  </Border.BorderBrush>
                  <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                    Margin="{TemplateBinding Padding}" />
                </Border>
              </Border>
              <ControlTemplate.Triggers>
                <Trigger Property="IsMouseOver"
                         Value="False">
                  <Setter TargetName="OuterBorder"
                          Property="Background"
                          Value="Transparent" />
                  <Setter TargetName="OuterBorder"
                          Property="BorderBrush"
                          Value="Transparent" />
                  <Setter TargetName="InnerBorder"
                          Property="BorderBrush"
                          Value="Transparent" />
                </Trigger>
                <Trigger Property="IsPressed"
                         Value="True">
                  <Setter Property="Background">
                    <Setter.Value>
                      <LinearGradientBrush StartPoint="0,1"
                                           EndPoint="0,0">
                        <GradientStop Offset="0"
                                      Color="#646464" />
                        <GradientStop Offset="1"
                                      Color="#353535" />
                      </LinearGradientBrush>
                    </Setter.Value>
                  </Setter>
                  <Setter TargetName="OuterBorder"
                          Property="BorderBrush">
                    <Setter.Value>
                      <LinearGradientBrush StartPoint="0,1"
                                           EndPoint="0,0">
                        <GradientStop Offset="0"
                                      Color="#0d0d0d" />
                        <GradientStop Offset="0.5"
                                      Color="#151515" />
                        <GradientStop Offset="1"
                                      Color="#121212" />
                      </LinearGradientBrush>
                    </Setter.Value>
                  </Setter>
                  <Setter TargetName="InnerBorder"
                          Property="BorderBrush">
                    <Setter.Value>
                      <LinearGradientBrush StartPoint="0,1"
                                           EndPoint="0,0">
                        <GradientStop Offset="0"
                                      Color="#7c7c7c" />
                        <GradientStop Offset="0.5"
                                      Color="#2a2a2a" />
                        <GradientStop Offset="1"
                                      Color="#121212" />
                      </LinearGradientBrush>
                    </Setter.Value>
                  </Setter>

                </Trigger>
              </ControlTemplate.Triggers>
            </ControlTemplate>
          </Setter.Value>
        </Setter>
      </Style>

      <Style TargetType="Button"
             BasedOn="{StaticResource BaseButtonStyle}" />
      <Style TargetType="ToggleButton"
             BasedOn="{StaticResource BaseButtonStyle}" />
      <Style TargetType="{x:Type TabItem}">
        <Setter Property="Foreground"
                Value="White" />
        <Setter Property="FontSize"
                Value="8pt" />
        <Setter Property="Padding"
                Value="8,4" />
        <Setter Property="Template">
          <Setter.Value>
            <ControlTemplate TargetType="{x:Type TabItem}">
              <Grid>
                <Border x:Name="Fill"
                        BorderThickness="0,1,0,0"
                        BorderBrush="#494949">
                  <Border.Background>
                    <LinearGradientBrush StartPoint="0,0"
                                         EndPoint="0,1">
                      <GradientStop Offset="0.0"
                                    Color="#000000" />
                      <GradientStop Offset="0.5"
                                    Color="#0a0a0a" />
                      <GradientStop Offset="1.0"
                                    Color="#131313" />
                    </LinearGradientBrush>
                  </Border.Background>
                </Border>
                <Rectangle Width="1"
                           HorizontalAlignment="Right">
                  <Rectangle.Fill>
                    <LinearGradientBrush StartPoint="0,0"
                                         EndPoint="0,1">
                      <GradientStop Offset="0"
                                    Color="#494949" />
                      <GradientStop Offset="1"
                                    Color="#00494949" />
                    </LinearGradientBrush>
                  </Rectangle.Fill>
                </Rectangle>
                <ContentPresenter ContentSource="Header"
                                  Margin="{TemplateBinding Padding}" />
              </Grid>
              <ControlTemplate.Triggers>
                <Trigger Property="IsSelected"
                         Value="True">
                  <Setter TargetName="Fill"
                          Property="Background"
                          Value="Transparent" />
                  <Setter TargetName="Fill"
                          Property="BorderBrush"
                          Value="Transparent" />
                </Trigger>
              </ControlTemplate.Triggers>
            </ControlTemplate>
          </Setter.Value>
        </Setter>
      </Style>
      <Style TargetType="{x:Type TabControl}">
        <Setter Property="Foreground"
                Value="White" />
        <Setter Property="Padding"
                Value="5" />
        <Setter Property="Template">
          <Setter.Value>
            <ControlTemplate TargetType="{x:Type TabControl}">
              <DockPanel LastChildFill="True">
                <Border DockPanel.Dock="Bottom">
                  <DockPanel DockPanel.Dock="Bottom"
                             LastChildFill="True">
                    <TabPanel DockPanel.Dock="Left"
                              IsItemsHost="True" />
                    <Border BorderThickness="0,1,0,0"
                            BorderBrush="#494949">
                      <Border.Background>
                        <LinearGradientBrush StartPoint="0,0"
                                             EndPoint="0,1">
                          <GradientStop Offset="0.0"
                                        Color="#000000" />
                          <GradientStop Offset="0.5"
                                        Color="#0a0a0a" />
                          <GradientStop Offset="1.0"
                                        Color="#131313" />
                        </LinearGradientBrush>
                      </Border.Background>
                    </Border>
                  </DockPanel>
                </Border>
                <Border Padding="{TemplateBinding Padding}">
                  <ListBox ItemsSource="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Items}"
                           SelectedItem="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=SelectedItem, Mode=TwoWay}">
                    <ListBox.Template>
                      <ControlTemplate TargetType="{x:Type ListBox}">
                        <Border>
                          <ItemsPresenter />
                        </Border>
                      </ControlTemplate>
                    </ListBox.Template>
                    <ListBox.ItemsPanel>
                      <ItemsPanelTemplate>
                        <Grid />
                      </ItemsPanelTemplate>
                    </ListBox.ItemsPanel>
                    <ListBox.ItemContainerStyle>
                      <Style TargetType="{x:Type ListBoxItem}">
                        <Setter Property="Template">
                          <Setter.Value>
                            <ControlTemplate TargetType="{x:Type ListBoxItem}">
                              <ContentPresenter />
                            </ControlTemplate>
                          </Setter.Value>
                        </Setter>
                      </Style>
                    </ListBox.ItemContainerStyle>
                    <ListBox.ItemTemplate>
                      <DataTemplate DataType="{x:Type TabItem}">
                        <ContentPresenter x:Name="ContentSite"
                                          ContentTemplate="{x:Null}"
                                          Content="{Binding Path=Content}"
                                          Visibility="Hidden" />
                        <DataTemplate.Triggers>
                          <DataTrigger Binding="{Binding Path=IsSelected}"
                                       Value="True">
                            <Setter TargetName="ContentSite"
                                    Property="Visibility"
                                    Value="Visible" />
                          </DataTrigger>
                        </DataTemplate.Triggers>
                      </DataTemplate>
                    </ListBox.ItemTemplate>
                  </ListBox>
                </Border>
              </DockPanel>
            </ControlTemplate>
          </Setter.Value>
        </Setter>
      </Style>
    </Style.Resources>
    <Setter Property="Foreground"
            Value="#ffffff" />
    <Setter Property="Padding"
            Value="5" />
    <Setter Property="Opacity"
            Value="1.0" />
    <Setter Property="HorizontalContentAlignment"
            Value="Stretch" />
    <Setter Property="VerticalContentAlignment"
            Value="Stretch" />
    <Setter Property="Width"
            Value="250" />
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type scc:InfoCard}">
          <!--<Border BorderThickness="1"
                  CornerRadius="4"
                  Padding="1"
                  SnapsToDevicePixels="True">
            <Border.Background>
              <LinearGradientBrush StartPoint="0,0"
                                   EndPoint="0,1">
                <GradientStop Offset="0"
                              Color="#000000" />
                <GradientStop Offset="0.5"
                              Color="#171717" />
                <GradientStop Offset="0.5"
                              Color="#151515" />
                <GradientStop Offset="1"
                              Color="#0b0b0b" />
              </LinearGradientBrush>
            </Border.Background>-->
            <DockPanel LastChildFill="True">
              <Border x:Name="HeaderOuterBorder"
                      DockPanel.Dock="Top"
                      BorderThickness="1,1,1,0"
                      CornerRadius="3,3,0,0"
                      SnapsToDevicePixels="True">
                <Border.Background>
                  <LinearGradientBrush StartPoint="0,0"
                                       EndPoint="0,1">
                    <GradientStop Offset="0"
                                  Color="#2c2c2c" />
                    <GradientStop Offset="1"
                                  Color="#0c0c0c" />
                    <!--
                      <GradientStop Offset="0" Color="#2d2d2d" />
                      <GradientStop Offset="0.5" Color="#171717" />
                      <GradientStop Offset="0.5" Color="#010101" />
                      <GradientStop Offset="1" Color="#000000" />
                      -->
                  </LinearGradientBrush>
                </Border.Background>
                <Border.BorderBrush>
                  <LinearGradientBrush StartPoint="0,0"
                                       EndPoint="0,1">

                    <GradientStop Offset="0"
                                  Color="#646464" />
                    <GradientStop Offset="1"
                                  Color="#4e4e4e" />
                    <!--
                      <GradientStop Offset="0" Color="#656565" />
                      <GradientStop Offset="0.5" Color="#525252" />
                      <GradientStop Offset="0.5" Color="#494949" />
                      <GradientStop Offset="1" Color="#494949" />
                      -->
                  </LinearGradientBrush>
                </Border.BorderBrush>
                <Border x:Name="HeaderInnerBorder"
                        BorderThickness="1,1,1,0"
                        CornerRadius="2,2,0,0"
                        SnapsToDevicePixels="True">
                  <Border.BorderBrush>
                    <LinearGradientBrush StartPoint="0,0"
                                         EndPoint="0,1">
                      <GradientStop Offset="0"
                                    Color="#2c2c2c" />
                      <GradientStop Offset="1"
                                    Color="#222222" />
                      <!--
                        <GradientStop Offset="0" Color="#3f3f3f" />
                        <GradientStop Offset="0.5" Color="#2b2b2b" />
                        <GradientStop Offset="0.5" Color="#181818" />
                        <GradientStop Offset="1" Color="#0d0d0d" />
                        -->
                    </LinearGradientBrush>
                  </Border.BorderBrush>
                  <Grid>
                    <Grid.RowDefinitions>
                      <RowDefinition Height="*" />
                      <RowDefinition Height="Auto" />
                    </Grid.RowDefinitions>
                    <Grid Grid.Row="0">
                      <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*" />
                        <ColumnDefinition Width="Auto" />
                      </Grid.ColumnDefinitions>
                      <StackPanel Grid.Column="1"
                                  Orientation="Horizontal"
                                  VerticalAlignment="Top">
                        <ToggleButton Style="{StaticResource TitleBarButtonStyle}"
                                      IsChecked="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsPinned, Mode=TwoWay}"
                                      Visibility="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=CanPin, Converter={StaticResource BooleanToVisibilityConverter}}"
                                      VerticalAlignment="Top"
                                      Width="20"
                                      Height="20"
                                      Margin="0,3,0,3">
                          <Rectangle x:Name="PinGlyph"
                                     Width="16"
                                     Height="16"
                                     HorizontalAlignment="Center"
                                     VerticalAlignment="Center"
                                     Fill="{StaticResource UnpinnedGlyph}" />
                        </ToggleButton>
                        <Button Command="{x:Static scc:InfoCard.CloseCommand}"
                                Style="{StaticResource TitleBarButtonStyle}"
                                VerticalAlignment="Top"
                                Width="20"
                                Height="20"
                                Margin="0,3,3,3">
                          <Path x:Name="CloseGlyph"
                                Width="8"
                                Height="8"
                                Stretch="None"
                                Stroke="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Foreground}"
                                StrokeThickness="2"
                                StrokeStartLineCap="Triangle"
                                StrokeEndLineCap="Triangle"
                                SnapsToDevicePixels="True"
                                Data="M 0,0 L 8,8 M 0,8 L 8,0" />
                        </Button>
                      </StackPanel>
                      <ContentPresenter x:Name="HeaderSite"
                                        Grid.Row="0"
                                        Margin="5"
                                        ContentSource="Header" />
                    </Grid>
                    <DockPanel x:Name="FooterSite"
                               Grid.Row="1"
                               LastChildFill="True"
                               Margin="5,0,3,3">
                      <ToggleButton x:Name="ExpansionButton"
                                    DockPanel.Dock="Right"
                                    Height="20"
                                    Width="20"
                                    IsChecked="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsExpanded, Mode=TwoWay}"
                                    Visibility="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=HasContent, Converter={StaticResource BooleanToVisibilityConverter}}">
                        <Path x:Name="ExpansionGlyph"
                              Fill="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Foreground}"
                              StrokeLineJoin="Miter"
                              StrokeStartLineCap="Triangle"
                              StrokeEndLineCap="Triangle"
                              Data="M 0,5 L 4,0 L 8,5 Z" />
                      </ToggleButton>
                      <ContentPresenter ContentSource="Footer" />
                    </DockPanel>
                  </Grid>
                </Border>
              </Border>
              <Border x:Name="ContentOuterBorder"
                      CornerRadius="0,0,3,3"
                      BorderThickness="1,0,1,1"
                      SnapsToDevicePixels="True"
                      Visibility="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsExpanded, Converter={StaticResource BooleanToVisibilityConverter}}">
                <Border.Background>
                  <LinearGradientBrush StartPoint="0,0"
                                       EndPoint="0,1">
                    <GradientStop Offset="0"
                                  Color="#0c0c0c" />
                    <GradientStop Offset="1"
                                  Color="#000000" />
                  </LinearGradientBrush>
                </Border.Background>
                <Border.BorderBrush>
                  <LinearGradientBrush StartPoint="0,0"
                                       EndPoint="0,1">
                    <GradientStop Offset="0"
                                  Color="#494949" />
                    <GradientStop Offset="1"
                                  Color="#4a4a4a" />
                  </LinearGradientBrush>
                </Border.BorderBrush>
                <Border BorderThickness="1,0,1,1"
                        CornerRadius="0,0,2,2"
                        SnapsToDevicePixels="True">
                  <Border.BorderBrush>
                    <LinearGradientBrush StartPoint="0,0"
                                         EndPoint="0,1">
                      <GradientStop Offset="0"
                                    Color="#181818" />
                      <GradientStop Offset="1"
                                    Color="#0d0d0d" />
                    </LinearGradientBrush>
                  </Border.BorderBrush>
                  <ContentPresenter Margin="{TemplateBinding Padding}"
                                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
                </Border>
              </Border>
            </DockPanel>
          <!--</Border>-->
            <ControlTemplate.Triggers>
            <Trigger Property="IsExpanded"
                     Value="False">
              <Setter TargetName="HeaderOuterBorder"
                      Property="BorderThickness"
                      Value="1" />
              <Setter TargetName="HeaderOuterBorder"
                      Property="CornerRadius"
                      Value="3" />
              <Setter TargetName="HeaderInnerBorder"
                      Property="CornerRadius"
                      Value="2" />
              <Setter TargetName="ExpansionGlyph"
                      Property="Data"
                      Value="M 0,0 L 4,5 L 8,0 Z" />
            </Trigger>
            <Trigger Property="IsPinned"
                     Value="True">
              <Setter TargetName="PinGlyph"
                      Property="Fill"
                      Value="{StaticResource PinnedGlyph}" />
            </Trigger>
            <Trigger Property="HasFooter"
                     Value="False">
              <Setter TargetName="ExpansionButton"
                      Property="Margin"
                      Value="0,-20,0,0" />
              <Setter TargetName="HeaderSite"
                      Property="Margin"
                      Value="5,5,5,2" />
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <!--
      END INFOCARD STYLE
    -->

  <!--
  <DrawingBrush x:Key="PinIconBrush"
                x:Uid="DrawingBrush_11"
                Stretch="Uniform">
    <DrawingBrush.Drawing>
      <DrawingGroup x:Uid="DrawingGroup_182">
        <DrawingGroup x:Uid="DrawingGroup_183">
          <DrawingGroup.Transform>
            <MatrixTransform x:Uid="MatrixTransform_60"
                             Matrix="1,0,0,1,1,1" />
          </DrawingGroup.Transform>
        </DrawingGroup>
        <GeometryDrawing x:Uid="GeometryDrawing_130"
                         Brush="#0d293f"
                         Geometry="F0 M 1.0029932,0 L 8.0170181,0 8.0170181,4.9960049 9.0139997,4.9960049 9.0139997,8.0000043 6.0020138,8.0000043 6.0020138,9.9969984 5.013014,9.9969984 5.013014,11.002 4.0070139,11.002 4.0070139,9.9969984 3.0020138,9.9969984 3.0020138,8.0000043 0,8.0000043 0,4.9960049 1.0029932,4.9960049 Z" />
        <DrawingGroup x:Uid="DrawingGroup_184">
          <DrawingGroup.Transform>
            <MatrixTransform x:Uid="MatrixTransform_61"
                             Matrix="1,0,0,1,4,8" />
          </DrawingGroup.Transform>
          <GeometryDrawing x:Uid="GeometryDrawing_131"
                           Brush="White"
                           Geometry="F0 M -7.8125E-06,9.2402344E-06 L 0.99999219,9.2402344E-06 0.99999219,1.9920092 -7.8125E-06,1.9920092 Z" />
        </DrawingGroup>
        <DrawingGroup x:Uid="DrawingGroup_185">
          <DrawingGroup.Transform>
            <MatrixTransform x:Uid="MatrixTransform_62"
                             Matrix="1,0,0,1,1,0.984" />
          </DrawingGroup.Transform>
          <GeometryDrawing x:Uid="GeometryDrawing_132"
                           Brush="White"
                           Geometry="F0 M 6.0000005,5.0130043 L 6.0000005,4.3457031E-06 1.0039904,4.3457031E-06 1.0039904,5.0130043 -1.1669945E-05,5.0130043 -1.1669945E-05,6.0000043 6.9980025,6.0000043 6.9980025,5.0130043 Z" />
        </DrawingGroup>
      </DrawingGroup>
    </DrawingBrush.Drawing>
  </DrawingBrush>
  <DrawingBrush x:Key="UnpinIconBrush"
                x:Uid="DrawingBrush_12"
                Stretch="Uniform">
    <DrawingBrush.Drawing>
      <DrawingGroup x:Uid="DrawingGroup_186">
        <DrawingGroup x:Uid="DrawingGroup_187">
          <DrawingGroup.Transform>
            <MatrixTransform x:Uid="MatrixTransform_63"
                             Matrix="1,0,0,1,3,0" />
          </DrawingGroup.Transform>
          <GeometryDrawing x:Uid="GeometryDrawing_133"
                           Brush="White"
                           Geometry="F0 M 0.5,0.5 L 2.5,0.5 2.5,1.5 7.5,1.5 7.5,7.5 2.5,7.5 2.5,8.5 0.5,8.5 Z">
            <GeometryDrawing.Pen>
              <Pen x:Uid="Pen_68"
                   Brush="#0d293f"
                   DashCap="Flat"
                   EndLineCap="Flat"
                   LineJoin="Miter"
                   MiterLimit="10"
                   StartLineCap="Flat"
                   Thickness="1" />
            </GeometryDrawing.Pen>
          </GeometryDrawing>
        </DrawingGroup>
        <DrawingGroup x:Uid="DrawingGroup_188">
          <DrawingGroup.Transform>
            <MatrixTransform x:Uid="MatrixTransform_64"
                             Matrix="1,0,0,1,0,3" />
          </DrawingGroup.Transform>
          <GeometryDrawing x:Uid="GeometryDrawing_134"
                           Brush="#0d293f">
            <GeometryDrawing.Geometry>
              <PathGeometry x:Uid="PathGeometry_46"
                            Figures="M0.98900005,0 L3.989,0 3.989,3 0.98900005,3 0.98900005,2 0,2 0,1 0.98900005,1 z" />
            </GeometryDrawing.Geometry>
          </GeometryDrawing>
        </DrawingGroup>
        <DrawingGroup x:Uid="DrawingGroup_189">
          <DrawingGroup.Transform>
            <MatrixTransform x:Uid="MatrixTransform_65"
                             Matrix="1,0,0,1,1,4" />
          </DrawingGroup.Transform>
          <GeometryDrawing x:Uid="GeometryDrawing_135"
                           Brush="White"
                           Geometry="F0 M 0,0 L 2,0 2,1 0,1 Z" />
        </DrawingGroup>
        <DrawingGroup x:Uid="DrawingGroup_190">
          <DrawingGroup.Transform>
            <MatrixTransform x:Uid="MatrixTransform_66"
                             Matrix="1,0,0,1,0,2" />
          </DrawingGroup.Transform>
        </DrawingGroup>
      </DrawingGroup>
    </DrawingBrush.Drawing>
  </DrawingBrush>
  <BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />

  <Style x:Key="TitleBarButtonStyle"
         TargetType="ButtonBase">
    <Setter Property="Foreground"
            Value="White" />
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="ButtonBase">
          <Border x:Name="OuterBorder"
                  Width="16"
                  Height="16"
                  Background="#024a84">
            <ContentPresenter HorizontalAlignment="Center"
                              VerticalAlignment="Center" />
          </Border>
          <ControlTemplate.Triggers>
            <Trigger Property="IsMouseOver"
                     Value="True">
              <Setter TargetName="OuterBorder"
                      Property="Background"
                      Value="#1372bf" />
            </Trigger>
            <Trigger Property="IsPressed"
                     Value="True">
              <Setter TargetName="OuterBorder"
                      Property="Background"
                      Value="#0f5b99" />
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>

  <Style TargetType="scc:InfoCard">
    <Style.Resources>
      <Style TargetType="{x:Type Button}">
        <Setter Property="Foreground"
                Value="White" />
        <Setter Property="FontSize"
                Value="10pt" />
        <Setter Property="Padding"
                Value="6,3" />
        <Setter Property="Template">
          <Setter.Value>
            <ControlTemplate TargetType="{x:Type Button}">
              <Border x:Name="OuterBorder"
                      CornerRadius="4"
                      Background="#024a84">
                <ContentPresenter RecognizesAccessKey="True"
                                  Margin="{TemplateBinding Padding}"
                                  HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                  VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
              </Border>
              <ControlTemplate.Triggers>
                <Trigger Property="IsMouseOver"
                         Value="True">
                  <Setter TargetName="OuterBorder"
                          Property="Background"
                          Value="#1372bf" />
                </Trigger>
                <Trigger Property="IsPressed"
                         Value="True">
                  <Setter TargetName="OuterBorder"
                          Property="Background"
                          Value="#0f5b99" />
                </Trigger>
              </ControlTemplate.Triggers>
            </ControlTemplate>
          </Setter.Value>
        </Setter>
      </Style>
    </Style.Resources>
    <Setter Property="SnapsToDevicePixels"
            Value="True" />
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type scc:InfoCard}">
          <Border x:Name="OuterBorder"
                  CornerRadius="8">
            <Border.Background>
              <LinearGradientBrush StartPoint="0,0"
                                   EndPoint="0,1">
                <GradientStop Offset="0"
                              Color="#00376f" />
                <GradientStop Offset="1"
                              Color="#0d293f" />
              </LinearGradientBrush>
            </Border.Background>
            <Grid>
              <StackPanel Orientation="Vertical"
                          HorizontalAlignment="Right"
                          VerticalAlignment="Top"
                          Background="Black"
                          Margin="0,12,0,0">
                <Button Margin="0,3,0,0"
                        Command="{x:Static scc:InfoCard.CloseCommand}"
                        Style="{StaticResource TitleBarButtonStyle}">
                  <Path Stroke="#0d293f"
                        Fill="White"
                        StrokeThickness="1"
                        StrokeLineJoin="Miter"
                        Stretch="None"
                        Data="M 0,0 L 0,2 L 2.5,4.5 L 0,7 L 0,9 L 2,9 L 4.5,6.5 L 7,9 L 9,9 L 9,7 L 6.5,4.5 L 9,2 L 9,0 L 7,0 L 4.5,2.5 L 2,0 Z" />
                </Button>
                <ToggleButton x:Name="PinToggleButton"
                              Margin="0,3,0,3"
                              IsChecked="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsPinned, Mode=TwoWay}"
                              Visibility="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=CanPin, Converter={StaticResource BooleanToVisibilityConverter}}"
                              Style="{StaticResource TitleBarButtonStyle}">
                  <ToggleButton.ContentTemplate>
                    <DataTemplate>
                      <Rectangle x:Name="PinIcon"
                                 Width="12"
                                 Height="12"
                                 Fill="{StaticResource PinIconBrush}"
                                 SnapsToDevicePixels="True"
                                 RenderOptions.EdgeMode="Aliased" />
                      <DataTemplate.Triggers>
                        <DataTrigger Binding="{Binding ElementName=PinToggleButton, Path=IsChecked}"
                                     Value="False">
                          <Setter TargetName="PinIcon"
                                  Property="Fill"
                                  Value="{StaticResource UnpinIconBrush}" />
                        </DataTrigger>
                      </DataTemplate.Triggers>
                    </DataTemplate>
                  </ToggleButton.ContentTemplate>
                </ToggleButton>
              </StackPanel>
              <Border Background="Black"
                      CornerRadius="7"
                      Margin="3,3,16,3">
                <Grid>
                  <Grid Margin="3">
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition Width="16" />
                      <ColumnDefinition Width="*" />
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                      <RowDefinition Height="Auto"
                                     MinHeight="29" />
                      <RowDefinition Height="Auto"
                                     MinHeight="24" />
                      <RowDefinition Height="Auto" />
                    </Grid.RowDefinitions>

                    <Border Grid.Row="0"
                            CornerRadius="5,0,0,0"
                            Background="#0d293f" />
                    <Border Grid.Row="1"
                            Grid.RowSpan="2"
                            CornerRadius="0,0,0,5"
                            Margin="0,3,0,0"
                            Background="#00376f" />

                    <Grid Grid.Row="2"
                          Grid.Column="1"
                          Visibility="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsExpanded, Converter={StaticResource BooleanToVisibilityConverter}, Mode=OneWay}">
                      <Border VerticalAlignment="Bottom"
                              Height="6"
                              Background="#00376f" />
                      <Border VerticalAlignment="Bottom"
                              Height="3"
                              Margin="0,0,0,3"
                              Background="Black"
                              CornerRadius="0,0,0,3" />
                    </Grid>

                    <Grid Grid.Column="1"
                          Margin="3,0,0,0">
                      <ContentPresenter ContentSource="Header"
                                        TextBlock.FontFamily="{DynamicResource {x:Static scc:ClientResources.DefaultFontFamilyKey}}"
                                        TextBlock.Foreground="{DynamicResource {x:Static scc:ClientResources.HeaderTextForegroundBrushKey}}" />
                    </Grid>

                    <DockPanel Grid.Column="1"
                               Grid.Row="1"
                               Margin="3,0,3,0"
                               LastChildFill="True">
                      <ToggleButton DockPanel.Dock="Right"
                                    Width="16"
                                    Height="16"
                                    VerticalAlignment="Bottom"
                                    Visibility="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=HasContent, Converter={StaticResource BooleanToVisibilityConverter}}"
                                    IsChecked="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsExpanded, Mode=TwoWay}">
                        <ToggleButton.Template>
                          <ControlTemplate TargetType="{x:Type ToggleButton}">
                            <Border x:Name="OuterBorder"
                                    Background="Transparent"
                                    BorderBrush="#7f024a84"
                                    BorderThickness="1.5"
                                    CornerRadius="3">
                              <Path x:Name="ExpansionGlyph"
                                    HorizontalAlignment="Center"
                                    VerticalAlignment="Center"
                                    Fill="White"
                                    Width="8"
                                    Height="4"
                                    Stretch="Uniform"
                                    Data="F1 M 0,0 L 4,4 L 8,0 Z" />
                            </Border>
                            <ControlTemplate.Triggers>
                              <Trigger Property="IsMouseOver"
                                       Value="True">
                                <Setter TargetName="OuterBorder"
                                        Property="BorderBrush"
                                        Value="#ff024a84" />
                              </Trigger>
                              <Trigger Property="IsPressed"
                                       Value="True">
                                <Setter TargetName="OuterBorder"
                                        Property="BorderBrush"
                                        Value="#ff47bffb" />
                              </Trigger>
                              <Trigger Property="IsChecked"
                                       Value="True">
                                <Setter TargetName="ExpansionGlyph"
                                        Property="Data"
                                        Value="F1 M 0,4 L 4,0 L 8,4 Z" />
                              </Trigger>
                            </ControlTemplate.Triggers>
                          </ControlTemplate>
                        </ToggleButton.Template>
                      </ToggleButton>
                      <ContentPresenter ContentSource="Footer" />
                    </DockPanel>

                    <Grid Grid.Row="3"
                          Grid.ColumnSpan="2"
                          Margin="0,3,0,0"
                          Visibility="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsExpanded, Converter={StaticResource BooleanToVisibilityConverter}}">
                      <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="16" />
                        <ColumnDefinition Width="*" />
                      </Grid.ColumnDefinitions>
                      <Grid.RowDefinitions>
                        <RowDefinition Height="2*"
                                       MinHeight="8" />
                        <RowDefinition Height="1*"
                                       MinHeight="8" />
                        <RowDefinition Height="4*"
                                       MinHeight="8" />
                      </Grid.RowDefinitions>

                      <Border Grid.Row="0"
                              CornerRadius="5,0,0,0"
                              Background="#0d293f" />
                      <Border Grid.Row="1"
                              CornerRadius="0,0,0,0"
                              Margin="0,3,0,0"
                              Background="#061727" />
                      <Border Grid.Row="2"
                              CornerRadius="0,0,0,5"
                              Margin="0,3,0,0"
                              Background="#00376f" />

                      <Border Grid.Column="1"
                              Grid.Row="0"
                              Grid.RowSpan="3"
                              Margin="6,9,3,3">
                        <ContentPresenter TextBlock.FontFamily="{DynamicResource {x:Static scc:ClientResources.DefaultFontFamilyKey}}"
                                          TextBlock.Foreground="{DynamicResource {x:Static scc:ClientResources.DefaultTextForegroundBrushKey}}" />
                      </Border>

                      <Border Grid.Column="1"
                              Grid.Row="0"
                              VerticalAlignment="Top"
                              Height="6"
                              Margin="0,0,0,0"
                              Background="#0d293f" />
                      <Border Grid.Column="1"
                              Grid.Row="0"
                              VerticalAlignment="Top"
                              Height="3"
                              Margin="0,3,0,0"
                              Background="Black"
                              CornerRadius="3,0,0,0" />
                    </Grid>
                  </Grid>
                </Grid>
              </Border>
            </Grid>
          </Border>
          <ControlTemplate.Triggers>
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="HasHeader"
                           Value="False" />
                <Condition Property="HasContent"
                           Value="False" />
              </MultiTrigger.Conditions>
              <Setter Property="Visibility"
                      Value="Collapsed" />
            </MultiTrigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
-->

</ResourceDictionary>